package org.tigris.scarab.model;

import java.io.Serializable;
import java.util.Date;

/**
 * History of changes made to the attributes of an issue.
 */
public class Activity implements Serializable {
    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.ACTIVITY_ID
     */
    private Long activityId;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.ISSUE_ID
     */
    private Issue issue;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.ATTRIBUTE_ID
     */
    private Integer attributeId;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.TRANSACTION_ID
     */
    private Long transactionId;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.OLD_NUMERIC_VALUE
     */
    private Integer oldNumericValue;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.NEW_NUMERIC_VALUE
     */
    private Integer newNumericValue;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.OLD_USER_ID
     */
    private Integer oldUserId;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.NEW_USER_ID
     */
    private Integer newUserId;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.OLD_OPTION_ID
     */
    private Integer oldOptionId;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.NEW_OPTION_ID
     */
    private Integer newOptionId;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.OLD_VALUE
     */
    private String oldValue;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.NEW_VALUE
     */
    private String newValue;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.DEPEND_ID
     */
    private Integer dependId;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.DESCRIPTION
     */
    private String description;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.END_DATE
     */
    private Date endDate;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.ATTACHMENT_ID
     */
    private Long attachmentId;

    /**
     * This field corresponds to the database column SCARAB_ACTIVITY.ACTIVITY_TYPE
     */
    private ActivityTypeEnum activityType;

    public Activity() {}

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.ACTIVITY_ID
     *
     * @return the value of SCARAB_ACTIVITY.ACTIVITY_ID
     */
    public Long getActivityId() {
        return activityId;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.ACTIVITY_ID
     *
     * @param activityId the value for SCARAB_ACTIVITY.ACTIVITY_ID
     */
    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    /**
     * @return the Issue bound to this Activity if exists, else null.
     */
    public Issue getIssue() {
        return issue;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.ATTRIBUTE_ID
     *
     * @return the value of SCARAB_ACTIVITY.ATTRIBUTE_ID
     */
    public Integer getAttributeId() {
        return attributeId;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.ATTRIBUTE_ID
     *
     * @param attributeId the value for SCARAB_ACTIVITY.ATTRIBUTE_ID
     */
    public void setAttributeId(Integer attributeId) {
        this.attributeId = attributeId;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.TRANSACTION_ID
     *
     * @return the value of SCARAB_ACTIVITY.TRANSACTION_ID
     */
    public Long getTransactionId() {
        return transactionId;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.TRANSACTION_ID
     *
     * @param transactionId the value for SCARAB_ACTIVITY.TRANSACTION_ID
     */
    public void setTransactionId(Long transactionId) {
        this.transactionId = transactionId;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.OLD_NUMERIC_VALUE
     *
     * @return the value of SCARAB_ACTIVITY.OLD_NUMERIC_VALUE
     */
    public Integer getOldNumericValue() {
        return oldNumericValue;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.OLD_NUMERIC_VALUE
     *
     * @param oldNumericValue the value for SCARAB_ACTIVITY.OLD_NUMERIC_VALUE
     */
    public void setOldNumericValue(Integer oldNumericValue) {
        this.oldNumericValue = oldNumericValue;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.NEW_NUMERIC_VALUE
     *
     * @return the value of SCARAB_ACTIVITY.NEW_NUMERIC_VALUE
     */
    public Integer getNewNumericValue() {
        return newNumericValue;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.NEW_NUMERIC_VALUE
     *
     * @param newNumericValue the value for SCARAB_ACTIVITY.NEW_NUMERIC_VALUE
     */
    public void setNewNumericValue(Integer newNumericValue) {
        this.newNumericValue = newNumericValue;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.OLD_USER_ID
     *
     * @return the value of SCARAB_ACTIVITY.OLD_USER_ID
     */
    public Integer getOldUserId() {
        return oldUserId;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.OLD_USER_ID
     *
     * @param oldUserId the value for SCARAB_ACTIVITY.OLD_USER_ID
     */
    public void setOldUserId(Integer oldUserId) {
        this.oldUserId = oldUserId;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.NEW_USER_ID
     *
     * @return the value of SCARAB_ACTIVITY.NEW_USER_ID
     */
    public Integer getNewUserId() {
        return newUserId;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.NEW_USER_ID
     *
     * @param newUserId the value for SCARAB_ACTIVITY.NEW_USER_ID
     */
    public void setNewUserId(Integer newUserId) {
        this.newUserId = newUserId;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.OLD_OPTION_ID
     *
     * @return the value of SCARAB_ACTIVITY.OLD_OPTION_ID
     */
    public Integer getOldOptionId() {
        return oldOptionId;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.OLD_OPTION_ID
     *
     * @param oldOptionId the value for SCARAB_ACTIVITY.OLD_OPTION_ID
     */
    public void setOldOptionId(Integer oldOptionId) {
        this.oldOptionId = oldOptionId;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.NEW_OPTION_ID
     *
     * @return the value of SCARAB_ACTIVITY.NEW_OPTION_ID
     */
    public Integer getNewOptionId() {
        return newOptionId;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.NEW_OPTION_ID
     *
     * @param newOptionId the value for SCARAB_ACTIVITY.NEW_OPTION_ID
     */
    public void setNewOptionId(Integer newOptionId) {
        this.newOptionId = newOptionId;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.OLD_VALUE
     *
     * @return the value of SCARAB_ACTIVITY.OLD_VALUE
     */
    public String getOldValue() {
        return oldValue;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.OLD_VALUE
     *
     * @param oldValue the value for SCARAB_ACTIVITY.OLD_VALUE
     */
    public void setOldValue(String oldValue) {
        this.oldValue = oldValue == null ? null : oldValue.trim();
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.NEW_VALUE
     *
     * @return the value of SCARAB_ACTIVITY.NEW_VALUE
     */
    public String getNewValue() {
        return newValue;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.NEW_VALUE
     *
     * @param newValue the value for SCARAB_ACTIVITY.NEW_VALUE
     */
    public void setNewValue(String newValue) {
        this.newValue = newValue == null ? null : newValue.trim();
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.DEPEND_ID
     *
     * @return the value of SCARAB_ACTIVITY.DEPEND_ID
     */
    public Integer getDependId() {
        return dependId;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.DEPEND_ID
     *
     * @param dependId the value for SCARAB_ACTIVITY.DEPEND_ID
     */
    public void setDependId(Integer dependId) {
        this.dependId = dependId;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.DESCRIPTION
     *
     * @return the value of SCARAB_ACTIVITY.DESCRIPTION
     */
    public String getDescription() {
        return description;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.DESCRIPTION
     *
     * @param description the value for SCARAB_ACTIVITY.DESCRIPTION
     */
    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.END_DATE
     *
     * @return the value of SCARAB_ACTIVITY.END_DATE
     */
    public Date getEndDate() {
        return endDate;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.END_DATE
     *
     * @param endDate the value for SCARAB_ACTIVITY.END_DATE
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.ATTACHMENT_ID
     *
     * @return the value of SCARAB_ACTIVITY.ATTACHMENT_ID
     */
    public Long getAttachmentId() {
        return attachmentId;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.ATTACHMENT_ID
     *
     * @param attachmentId the value for SCARAB_ACTIVITY.ATTACHMENT_ID
     */
    public void setAttachmentId(Long attachmentId) {
        this.attachmentId = attachmentId;
    }

    /**
     * This method returns the value of the database column SCARAB_ACTIVITY.ACTIVITY_TYPE
     *
     * @return the value of SCARAB_ACTIVITY.ACTIVITY_TYPE
     */
    public ActivityTypeEnum getActivityType() {
//        return ActivityTypeEnum.valueOf(activityType);
        return activityType;
    }

    /**
     * This method sets the value of the database column SCARAB_ACTIVITY.ACTIVITY_TYPE
     *
     * @param activityType the value for SCARAB_ACTIVITY.ACTIVITY_TYPE
     */
    public void setActivityType(ActivityTypeEnum activityType) {
//        this.activityType = activityType == null ? null : activityType.value();
        this.activityType = activityType;
    }
}